
package com.cskaoyan.exception;

import com.cskaoyan.bean.common.BaseRespVo;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


/**
 * @Author: zhang
 * @Date: 2022/11/22 10:42
 * @Since: jdk1.8
 */

//@RestControllerAdvice
//public class CustomExceptionControllerAdvice {
//    @ExceptionHandler(HttpMessageNotReadableException.class)
//    public BaseRespVo<Object> illegalArgument(HttpMessageNotReadableException e) {
//        return BaseRespVo.error("输入参数非法");
//    }
//
//    @ExceptionHandler(IllegalArgumentException.class)
//    public BaseRespVo<Object> illegalArgument(IllegalArgumentException exception) {
//        String message = exception.getMessage();
//        return BaseRespVo.invalidParameter(message);
//    }
//}

